<?php

/**
 *相册发布
 */
$sql = "
CREATE TABLE IF NOT EXISTS " . tablename('tim_album') . " (
`album_id` int(10) unsigned  AUTO_INCREMENT,
`rid` int(11),
`uniacid` int(11) NOT NULL,
`album_name` varchar(50) NOT NULL,
`create_time` int(11) NOT NULL,
`cover` varchar(200) NOT NULL,
 PRIMARY KEY (`album_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;";
pdo_query($sql);

$sql = "
CREATE TABLE IF NOT EXISTS " . tablename('tim_album_pic') . " (
`pic_id` int(10) unsigned  AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`album_id` int(10),
`pic` varchar(200), 
`pic_name` varchar(100),
 PRIMARY KEY (`pic_id`),
 INDEX(`album_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;";
pdo_query($sql);

$sql = "
CREATE TABLE IF NOT EXISTS " . tablename('tim_album_user') . " (
`user_id` int(10) unsigned  AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`album_id` int(10),
`user_name` varchar(100),
`password` varchar(200),
 PRIMARY KEY (`user_id`),
 INDEX(`album_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;";
pdo_query($sql);




